home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Utilities / Rainboot / InstallRainboot2 < prev    next >
Encoding:
Text File  |  1999-07-05  |  17.4 KB  |  573 lines

  1. ;
  2. ; $VER: Install-Rainboot2 (5.04.99)
  3. ;
  4. ; by Andreas Falkenhahn & Kimmo Pekkola
  5. ;
  6.  
  7. (set ver 2)
  8. (set rev 64) 
  9.  
  10. ;---------------------------- Global Strings ---------------------------------
  11. (set #hello-msg (cat "\nRainboot2\n-\nThe Ultimate Multimedia Boot\n\nVersion " ver "." rev "\n\n(C) Copyright 1996-99 Andreas Falkenhahn & Kimmo Pekkola"))
  12. (set #locale-msg (cat "Select a language to use\nWählen Sie eine Sprache aus"))
  13. (set #identifyn "Libs/identify.library")
  14. (set #thxplayn "Libs/thxplay.library")
  15. (set #dirname "Rainboot")
  16. (set #guide1 "Rainboot2.guide")
  17. ;----------------------------------------------------------------------------
  18.  
  19. (message #hello-msg)
  20.  
  21. (set #locale
  22.     (askchoice
  23.         (prompt #locale-msg)
  24.         (help @askoptions-help)
  25.         (choices "english" "deutsch")
  26.     )
  27. )
  28.  
  29. (if (= #locale 0) (
  30.    (set #kick39-msg "Kickstarts below v39 are not fully tested, so you might first consider testing the program before installing it.")
  31.    (set #destdir-msg "Where you want Rainboot2 to be installed? A drawer called Rainboot will be created.")
  32.    (set #libs-msg "Copying libraries...")
  33.    (set #copyil-msg "\nCopying iff.library to LIBS:...")
  34.    (set #copypll-msg "\nCopying player61.library to LIBS:...")
  35.    (set #copyprl-msg "\nCopying ptreplay.library to LIBS:...")
  36.    (set #copytl-msg "\nCopying thxplay.library to LIBS:...")
  37.    (set #copyidl-msg "\nCopying identify.library to LIBS:...")
  38.    (set #copyrb-msg "\nCopying Rainboot2 to C:...")
  39.    (set #copyrbd-msg "\nCopying Rainboot2.data to C:...")
  40.    (set #copygm "\nThe GetModeID tool can be used to find out the modeid for a screenmode! Do you want to install it?")
  41.    (set #copygm-msg "\nCopying GetModeID to C:...")
  42.    (set #copy-msg "Copying files...")
  43.    (set #example-msg "Which of these example configs do you want to install?")
  44.    (set #fonts-msg "Do you want to install the fonts also? The examples won't work correctly without these fonts.")
  45.    (set #fonts-help "FuturaB, FuturaL and GoudyB are going to be installed in your FONTS: drawer")
  46.    (set #start-msg "Do you want Rainboot2 to be copied in your WBstartup drawer?")
  47.    (set #start-help "Copying Rainboot2 to your WBStartup drawer closes the bootscreen at the end of the booting. This does not start a new Rainboot2 even if one isn't running. It only stops it.")
  48.    (set #wbstart-msg "Where is your WBStartup drawer?")
  49.    (set #edit-msg "Now you still have to edit your s:startup-sequence. Just put the line (one line!):\n\n")
  50.    (set #edit-msg2 "\n\nsomewhere after the monitordrivers and reset your Amiga.\n(You might also need a MODEID or CGFX argument so check the docs for details)")
  51.    (set #edit2-msg "If you want to use Rainboot2 you must first create a config-file (check the docs and the examples) and the put Rainboot2 in your startup-sequence. Somewhere after the monitordrivers is probably a good place")
  52.    (set #tools-msg "Which tools do you want to install?")
  53.    (set #startmenu "What do you want to do?")
  54.    (set #choice1 "Install Rainboot")
  55.    (set #choice2 "Configure Rainboot")
  56.    (set #configintro "\nRainboot wasn`t found in your S:Startup-Sequence. Do you want the Installer to add it to your Startup-Sequence?")
  57.    (set #found1 "Rainboot has been found in your Startup-Sequence in the following line:")
  58.    (set #found2 "What to do with this line now?")
  59.    (set #found3 "Change line")
  60.    (set #found4 "Delete line")
  61.    (set #found5 "Nothing")
  62.    (set #sconfig "Which configuration do you want to use while booting?")
  63.    (set #wargs "Which options do you want to use?")
  64.    (set #arg1 "RTG - for usage under CGfx and Picasso96")
  65.    (set #arg2 "BESTFIT - use bestpossible screenmode (recommended)")
  66.    (set #arg3 "PUBLIC - open a public screen")
  67.    (set #arg4 "BBLANK - blank border to black")
  68.    (set #try1 "\nShall the selected configuration ")
  69.    (set #try2 " now be displayed so that you can check if it works on your system?")
  70.    (set #ftry (cat "\nIf the configuration has been displayed correctly, you can click on Continue "
  71.                    "now, it`ll be added to your Startup-Sequence. If there have been errors occured "
  72.                    "please look in the documentation or contact me for help!"
  73.    )) 
  74.    (set #warn (cat "\nWARNING! Are you sure that Rainboot shall be added to your Startup-Sequence? "
  75.                    "If you want this click on Continue now. A backup of your current Startup-Sequence "
  76.                    "will be saved to S:Startup-Sequence.rainboot!"
  77.    ))
  78.    (set #fini (cat "\nRainboot has been successfully installed in your Startup-Sequence! "
  79.                    "You should reboot your Amiga now and look, if they config is displayed "
  80.                    "correctly. If this is not the case, you can look in the documentation "
  81.                    "or contact me for help. To restore your old Startup-Sequence, open a Shell "
  82.                    "and type in:\n\n"
  83.                    "Copy S:Startup-Sequence.rainboot S:Startup-Sequence\n\n"
  84.                    "Have fun!"
  85.    ))
  86.    (set #ifi (cat "\nThe installation has been finished successfully. You can configure Rainboot "
  87.                   "now if you`ll click on Continue. If you don`t want that, you`ll have to click "
  88.                   "on Abort."
  89.    ))
  90. ))
  91.  
  92. (if (= #locale 1) (
  93.    (set #kick39-msg "Kickstart Versionen unter v39 wurden nicht komplett getestet, so sollten Sie vielleicht erstmal das Programm testen und dann installieren.")
  94.    (set #destdir-msg "Wo möchten Sie Rainboot2 installiert haben? Ein Verzeichnis namens Rainboot wird dort angelegt!")
  95.    (set #libs-msg "Kopiere Libraries...")
  96.    (set #copyil-msg "\nKopiere iff.library nach LIBS:...")
  97.    (set #copypll-msg "\nKopiere player61.library nach LIBS:...")
  98.    (set #copyprl-msg "\nKopiere ptreplay.library nach LIBS:...")
  99.    (set #copytl-msg "\nKopiere thxplay.library nach LIBS:...")
  100.    (set #copyidl-msg "\nKopiere identify.library nach LIBS:...")
  101.    (set #copyrb-msg "\nKopiere Rainboot2 nach C:...")
  102.    (set #copyrbd-msg "\nKopiere Rainboot2.data nach C:...")
  103.    (set #copy-msg "Kopiere Dateien...")
  104.    (set #copygm "\nDas GetModeID Tool kann benutzt werden, um herauszufinden, welcher ModeID zu welchen Bildschirmmodus gehört. Möchten Sie es installieren?")
  105.    (set #copygm-msg "\nKopiere GetModeID nach C:...")
  106.    (set #example-msg "Welche dieser Beispiele möchten Sie installieren?")
  107.    (set #fonts-msg "Möchten Sie auch die Schriften installieren? Die Beispiele funktionieren ohne diese Schriften nicht korrekt.")
  108.    (set #fonts-help "FuturaB, FuturaL und GoudyB werden in Ihrem FONTS: Verzeichnis abgelegt!")
  109.    (set #start-msg "Soll Rainboot2 in Ihre WBStartup gelegt werden?")
  110.    (set #start-help "Rainboot2 in Ihrem WBStartup Verzeichnis schließt den Bootbildschirm, wenn Sie den Befehl %W in Ihrer Konfiguration benutzen.")
  111.    (set #wbstart-msg "Wo ist Ihr WBStartup Verzeichnis?")
  112.    (set #edit-msg "Jetzt müssen Sie noch Ihre Startup-Sequence edieren. Fügen Sie einfach diese Zeile (nur eine Zeile!):\n\n")
  113.    (set #edit-msg2 "\n\nirgendwo nach den Monitortreiber ein und starten Sie Ihren Amiga neu.\n(Möglicherweise müssen Sie auch das MODEID oder RTG Argument benutzen, schauen Sie in die Dokumentation!)")
  114.    (set #edit2-msg (cat "Wenn Sie Rainboot2 benutzen möchten, müssen Sie zuerst eine Konfiguration "
  115.                         "erstellen. Schauen Sie sich einfach mal die Beispiele an oder schauen Sie "
  116.                         "in die Dokumentation. Außerdem muss Rainboot in Ihre Startup-Sequence "
  117.                         "eingefügt werden!"
  118.    ))
  119.    (set #tools-msg "Welche Tools möchten Sie installieren?")
  120.    (set #startmenu "Was möchten Sie machen?")
  121.    (set #choice1 "Rainboot installieren")
  122.    (set #choice2 "Rainboot konfigurieren")
  123.    (set #configintro "\nRainboot wurde nicht in Ihrer Startup-Sequence gefunden. Möchten Sie, dass der Installer Rainboot dort einfügt?")
  124.    (set #found1 "Rainboot wurde in Ihrer Startup-Sequence in folgender Zeile gefunden:")
  125.    (set #found2 "Was soll mit dieser Zeile passieren?")
  126.    (set #found3 "Zeile ändern")
  127.    (set #found4 "Zeile löschen")
  128.    (set #found5 "Nichts")
  129.    (set #sconfig "Welche Konfiguration möchten Sie während dem Booten verwenden?")
  130.    (set #wargs "Welche Optionen möchten Sie verwenden?")
  131.    (set #arg1 "RTG - für die Verwendung unter CGfx und Picasso96")
  132.    (set #arg2 "BESTFIT - besten Bildschirmmodus nutzen (empfohlen)")
  133.    (set #arg3 "PUBLIC - Öffentlichen Bildschirm öffnen")
  134.    (set #arg4 "BBLANK - Bildschirmrand schwarz blenden")
  135.    (set #try1 "\nSoll die ausgewählte Boot-Konfiguration ")
  136.    (set #try2 " jetzt probeweise angezeigt werden, damit Sie überprüfen können, ob Rainboot auf Ihrem System läuft?")
  137.    (set #ftry (cat "\nWenn die Konfiguration problemlos angezeigt wurde, können Sie jetzt auf Weiter "
  138.                    "klicken, dann wird Sie in Ihre Startup-Sequence eingetragen. Sollte es Fehler "
  139.                    "gegeben haben, kontakten Sie bitte mich oder schauen in der Dokumentation nach!"
  140.    )) 
  141.    (set #warn (cat "\nACHTUNG! Sind Sie sicher, dass Rainboot in Ihre Startup-Sequence "
  142.                    "eingefügt werden soll? Wenn Sie das möchten, klicken Sie auf Weiter."
  143.                    "Es wird dann ein Backup Ihrer Startup-Sequence nach S:Startup-Sequence.rainboot "
  144.                    "gespeichert. "
  145.    ))
  146.    (set #fini (cat "\nRainboot wurde erfolgreich in Ihrer Startup-Sequence installiert! "
  147.                    "Sie sollten Ihren Amiga mal neustarten und schauen, ob Rainboot nun "
  148.                    "funktioniert. Sollte dies nicht der Fall sein, schauen Sie in die "
  149.                    "Dokumentation und kontakten ggf. mich. Um Ihre alte Startup-Sequence "
  150.                    "wiederherzustellen öffnen Sie eine Shell und geben folgendes ein:\n\n"
  151.                    "Copy S:Startup-Sequence.rainboot S:Startup-Sequence\n\n"
  152.                    "Viel Spaß!"
  153.    ))
  154.    (set #ifi (cat "\nDie Installation wurde erfolgreich abgeschlossen. Als nächtes können Sie Rainboot "
  155.                   "konfigurieren, klicken Sie dazu auf Weiter. Wenn Sie nichts mehr machen wollen, "
  156.                   "klicken Sie auf Abbrechen."
  157.    ))
  158. )) 
  159.  
  160. (procedure config
  161.  
  162.    (run "Tools/RBSSAdder SEARCH")
  163.    
  164.    (if (exists "ENV:RBENTRY") (
  165.       (set #rbpath (getenv "RBENTRY"))
  166.       (set wsmd
  167.           (askchoice
  168.                 (prompt (cat #found1 "\n\n" #rbpath "\n\n" #found2))
  169.                 (choices #found3 #found5)
  170.                 (help @askchoice-help)
  171.           )
  172.       )    
  173.  
  174.       (if (= wsmd 1) (
  175.          (exit (quiet))
  176.       ))           
  177.       
  178.       (delete "env:RBENTRY")
  179.    ) (
  180.       (set ychoice
  181.           (askbool
  182.              (prompt #configintro)
  183.              (help @askbool-help)
  184.           )
  185.       )
  186.       
  187.       (if (= ychoice 0) (
  188.          (exit (quiet))
  189.       ))   
  190.    ))   
  191.    
  192.    (set #rconfig
  193.        (askfile
  194.           (prompt #sconfig)
  195.           (help   @askfile-help)
  196.           (default "sys:")
  197.        )
  198.    )
  199.    
  200.    (set args
  201.        (askoptions       
  202.          (prompt #wargs)
  203.          (help @askoptions-help)
  204.          (choices #arg1 #arg2 #arg3 #arg4)
  205.          (default 0)
  206.        )
  207.    )      
  208.  
  209.    (if (in args 0)
  210.       (set #argy1 "RTG ")
  211.    )
  212.  
  213.    (if (in args 1)
  214.       (set #argy2 "BESTFIT ")
  215.    )
  216.  
  217.    (if (in args 2)
  218.       (set #argy3 "PUBLIC ")
  219.    )
  220.  
  221.    (if (in args 3)
  222.       (set #argy4 "BBLANK ")
  223.    )
  224.  
  225.    (set ttry
  226.        (askbool
  227.           (prompt #try1 #rconfig #try2)
  228.           (help @askbool-help)
  229.        )
  230.    )
  231.  
  232.    (if (= ttry 1) (
  233.       (run "Rainboot2 " #rconfig " " #argy1 #argy2 #argy3 #argy4)
  234.       (message #ftry)
  235.    ))
  236.  
  237.    (message #warn)
  238.  
  239.    (copyfiles
  240.       (source "S:Startup-Sequence")
  241.       (dest "S:")
  242.       (newname "Startup-Sequence.rainboot")
  243.       (nogauge)
  244.    )
  245.  
  246.    (run "Tools/RBSSAdder \"Rainboot2 " #rconfig #argy1 #argy2 #argy3 #argy4 "\"") 
  247.  
  248.    (message #fini)
  249.   
  250.    (exit (quiet))
  251.  
  252. )         
  253.  
  254. (welcome)
  255.  
  256. (if (< (/ (getversion) 65536) 39)
  257.     (message #kick39-msg)
  258. )
  259.  
  260. (set #selection
  261.     (askchoice
  262.         (prompt #startmenu)
  263.         (help @askoptions-help)
  264.         (choices #choice1 #choice2)
  265.     )
  266. )
  267.  
  268. (if (= #selection 1) (
  269.    (config)
  270. ))   
  271.  
  272. (set #destdir
  273.     (askdir
  274.         (prompt    #destdir-msg)
  275.         (help    @askdir-help)
  276.         (default "SYS:")
  277.     )
  278. )
  279.  
  280. (set @default-dest #destdir)
  281.  
  282. (makedir (tackon #destdir #dirname) (infos))
  283.  
  284. (copyfiles
  285.     (prompt #copy-msg)
  286.     (help @copyfiles-help)
  287.     (source "")
  288.     (dest (tackon #destdir #dirname))
  289.     (choices "Rainboot2" "Rainboot2.data" #guide1)
  290.     (infos)
  291. )
  292.  
  293. (copylib
  294.     (prompt #copyrb-msg)
  295.     (source "Rainboot2")
  296.     (dest "C:")
  297.     (help @copylib-help)
  298.         (optional force askuser)
  299.         (confirm)
  300. )
  301.  
  302. (copylib
  303.     (prompt #copyrbd-msg)
  304.     (source "Rainboot2.data")
  305.     (dest "C:")
  306.     (help @copylib-help)
  307.         (optional force askuser)
  308.         (confirm)
  309. )
  310.  
  311. (if (< (database "cpu") 68020) (
  312.    (set #identifyn "Libs/identify.library_000")
  313.    (set #thxplayn "Libs/thxplay.library_000")
  314. ))
  315.  
  316. (copylib
  317.     (prompt #copyprl-msg)
  318.     (source "Libs/ptreplay.library")
  319.     (dest "LIBS:")
  320.     (help @copylib-help)
  321.     (confirm)
  322.         (optional force askuser)
  323. )
  324.  
  325. (copylib
  326.     (prompt #copytl-msg)
  327.     (source #thxplayn)
  328.     (dest "LIBS:")
  329.         (newname "thxplay.library")
  330.     (help @copylib-help)
  331.     (confirm)
  332.         (optional force askuser)
  333. )
  334.  
  335. (copylib
  336.     (prompt #copypll-msg)
  337.     (source "Libs/player61.library")
  338.     (dest "LIBS:")
  339.     (help @copylib-help)
  340.     (confirm)
  341.         (optional force askuser)
  342. )
  343.  
  344. (copylib
  345.     (prompt #copyil-msg)
  346.     (source "Libs/iff.library")
  347.     (dest "LIBS:")
  348.     (help @copylib-help)
  349.     (confirm)
  350.         (optional force askuser)
  351. )
  352.  
  353. (copylib
  354.         (prompt #copyidl-msg)
  355.         (source #identifyn)
  356.         (dest "LIBS:")
  357.         (newname "identify.library")
  358.         (help @copylib-help)
  359.         (confirm)
  360.         (optional force askuser)
  361. )
  362.  
  363. (if (exists "Tools") (
  364.  
  365.    (makedir (tackon (tackon #destdir #dirname) "Tools") (infos))
  366.  
  367.    (set #tools
  368.     (askoptions
  369.         (prompt #tools-msg)
  370.         (help @askoptions-help)
  371.         (choices "GetModeID" "LoginMaker" "RainCreator" "RBLocaleCreator" "RBSSAdder")
  372.     )
  373.    )
  374.  
  375.    (if (in #tools 0)
  376.  
  377.     (copyfiles
  378.         (prompt #copy-msg)
  379.         (help @copyfiles-help)
  380.         (source "Tools/GetModeID")
  381.         (dest (tackon (tackon #destdir #dirname) "Tools"))
  382.         (pattern "GetModeID#?")
  383.         (infos)
  384.     )
  385.    )
  386.  
  387.    (if (in #tools 1)
  388.  
  389.     (copyfiles
  390.         (prompt #copy-msg)
  391.         (help @copyfiles-help)
  392.         (source "Tools/LoginMaker")
  393.         (dest (tackon (tackon #destdir #dirname) "Tools"))
  394.         (pattern "LoginMaker#?")
  395.         (infos)
  396.     )
  397.   )
  398.  
  399.   (if (in #tools 2)
  400.  
  401.         (copyfiles
  402.                 (prompt #copy-msg)
  403.                 (help @copyfiles-help)
  404.                 (source "Tools/RainCreator")
  405.                 (dest (tackon (tackon #destdir #dirname) "Tools"))
  406.                 (pattern "RainCreator#?")
  407.                 (infos)
  408.         )
  409.   )
  410.  
  411.   (if (in #tools 3)
  412.  
  413.         (copyfiles
  414.                 (prompt #copy-msg)
  415.                 (help @copyfiles-help)
  416.                 (source "Tools/RBLocaleCreator")
  417.                 (dest (tackon (tackon #destdir #dirname) "Tools"))
  418.                 (pattern "RBLocaleCreator#?")
  419.                 (infos)
  420.         )
  421.   )
  422.  
  423.   (if (in #tools 4)
  424.  
  425.         (copyfiles
  426.                 (prompt #copy-msg)
  427.                 (help @copyfiles-help)
  428.                 (source "Tools/RBSSAdder")
  429.                 (dest (tackon (tackon #destdir #dirname) "Tools"))
  430.                 (pattern "RBSSAdder#?")
  431.                 (infos)
  432.         )
  433.   )
  434.  
  435. ))
  436.  
  437. (if (exists "Configs") (
  438.  
  439.    (makedir (tackon (tackon #destdir #dirname) "Configs") (infos))
  440.  
  441.    (set #example
  442.     (askoptions
  443.         (prompt #example-msg)
  444.         (help @askoptions-help)
  445.         (choices "Cloudboot" "Cycle" "Demo" "CopperDemo" "SimpleLogin" "Window")
  446.         (default 1)
  447.     )
  448.    )
  449.  
  450.    (if (in #example 0)
  451.  
  452.     (copyfiles
  453.         (prompt #copy-msg)
  454.         (help @copyfiles-help)
  455.         (source "Configs")
  456.         (dest (tackon (tackon #destdir #dirname) "Configs"))
  457.         (pattern "Cloudboot#?")
  458.     )
  459.    )
  460.  
  461.    (if (in #example 1)
  462.  
  463.     (copyfiles
  464.         (prompt #copy-msg)
  465.         (help @copyfiles-help)
  466.         (source "Configs")
  467.         (dest (tackon (tackon #destdir #dirname) "Configs"))
  468.         (pattern "Cycle#?")
  469.     )
  470.   )
  471.  
  472.   (if (in #example 2)
  473.  
  474.         (copyfiles
  475.                 (prompt #copy-msg)
  476.                 (help @copyfiles-help)
  477.                 (source "Configs")
  478.                 (dest (tackon (tackon #destdir #dirname) "Configs"))
  479.                 (pattern "Demo#?")
  480.         )
  481.   )
  482.  
  483.   (if (in #example 3)
  484.  
  485.         (copyfiles
  486.                 (prompt #copy-msg)
  487.                 (help @copyfiles-help)
  488.                 (source "Configs")
  489.                 (dest (tackon (tackon #destdir #dirname) "Configs"))
  490.                 (pattern "CopperDemo#?")
  491.         )
  492.   )
  493.  
  494.   (if (in #example 4)
  495.  
  496.         (copyfiles
  497.                 (prompt #copy-msg)
  498.                 (help @copyfiles-help)
  499.                 (source "Configs")
  500.                 (dest (tackon (tackon #destdir #dirname) "Configs"))
  501.                 (pattern "SimpleLogin#?")
  502.         )
  503.   )
  504.  
  505.   (if (in #example 5)
  506.  
  507.         (copyfiles
  508.                 (prompt #copy-msg)
  509.                 (help @copyfiles-help)
  510.                 (source "Configs")
  511.                 (dest (tackon (tackon #destdir #dirname) "Configs"))
  512.                 (pattern "Window#?")
  513.         )
  514.   )
  515.  
  516. ))
  517.  
  518. (if (exists "Fonts") (
  519.  
  520.    (set #fonts #example)
  521.  
  522.    (set #fonts
  523.     (askbool
  524.         (prompt #fonts-msg)
  525.         (help #fonts-help)
  526.         (default 1)
  527.     )
  528.    )
  529.  
  530.    (if #fonts
  531.     (copyfiles
  532.         (prompt #copy-msg)
  533.         (help @copyfiles-help)
  534.         (source "Fonts")
  535.         (dest "FONTS:")
  536.         (all)
  537.     )
  538.    )
  539. ))
  540.  
  541. (set #start
  542.     (askbool
  543.         (prompt #start-msg)
  544.         (help #start-help)
  545.         (default 1)
  546.     )
  547. )
  548.  
  549. (if #start
  550.     ((set #wbdir 
  551.         (askdir
  552.             (prompt    #wbstart-msg)
  553.             (help    @askdir-help)
  554.             (default "SYS:WBStartup")
  555.         )
  556.     )
  557.  
  558.     (copyfiles
  559.         (prompt #copy-msg)
  560.         (help @copyfiles-help)
  561.         (source "")
  562.         (dest #wbdir)
  563.         (choices "Rainboot2" "Rainboot2.info")
  564.     ))
  565. )
  566.  
  567. (message #ifi)
  568.  
  569. (config)
  570. (exit (quiet))
  571. ;(message #edit-msg (tackon (tackon #destdir #dirname) "Rainboot2 ") (tackon (tackon #destdir #dirname) "Configs/Cloudboot.config") #edit-msg2)
  572. ;(message #edit2-msg)
  573.